hash = { "Thanh" => 100, "Tien" => 200 }

$flag = "yes";
while $flag=="yes" do
  print 'Hello! Type you keyword:'
  keyword = gets.chomp.to_s
  unless hash.has_key?(keyword)
    puts "There is no hash, create hash:"
    print keyword+" => "
    value = gets.chomp.to_s
    hash[keyword] = value
  else
    puts keyword+" => "+hash[keyword].to_s
  end
  print 'do you want to continue?[yes/no]'
  $flag = gets.chomp.to_s
end